/**
 * Created by wuli等等 on 2017/3/1.
 */
import React, { Component } from 'react';
import { View, Text ,StyleSheet,Switch} from 'react-native';


export default class Switch extends Component {
    constructor(props) {
        super(props);
        this.state = {
            switchVaule:false
        }
    };

    render() {
        return (
            <View style={styles.night}>
                <Switch
                    value={(this.state && this.state.switchValue) || false}
                    onValueChange={(value) => {this.setState({switchValue: value}) }}
                />
            </View>
        )
    }
}

let styles = StyleSheet.create({
    night:{
        flex:2,
        justifyContent: 'center'
    },
});